<?
  include('../init.php');

  $showcase_id= $_GET["aid"];
  
  $sql = "DELETE FROM showcase WHERE showcase_id=$showcase_id";
  $db->execute($sql);
  
  $sql = "DELETE FROM showcase_img WHERE showcase_id=$showcase_id";
  $db->execute($sql);
  
  if(file_exists('../../images/showcase/'.$showcase_id)){
    remove_dir('../../images/showcase/'.$showcase_id);
  }

  header("Location:index.php");
?>